package com.itheima.dao;

import com.itheima.pojo.BlogSort;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface BlogSortMapper extends Mapper<BlogSort> {

    @Select("SELECT * FROM t_blog_sort WHERE `content` LIKE CONCAT('%',#{keyWord},'%') OR sort_name LIKE CONCAT('%',#{keyWord},'%')")
    List<Map> findAllByKeyword(String keyword);
}
